<%@page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="/include/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title><fmt:message key="page.login.title"/></title>
	<link rel="stylesheet" href="<c:url value="/resources/css/login.css"/>" />
	<script src="<c:url value="/resources/dwz/js/jquery-1.7.1.js"/>" type="text/javascript"></script>
	<script type="text/javascript">
	<!--
		function validate(){
			var username = $('#username');
			var password = $('#password');
			
			if($.trim(username.val())==''){
				alert('<fmt:message key="invalid.fieldvalue.username"/>');
				username.focus();
				return false;
			}
			if($.trim(password.val())==''){
				alert('<fmt:message key="invalid.fieldvalue.password"/>');
				password.focus();
				return false;
			}
			return true;
		}
	//-->
	</script>
</head>
<body>
	<div id="loginBox">     
		<div id="loginTitle">
			<span>
				<fmt:message key="page.login.title"/>
			</span>
			&nbsp;&nbsp;&nbsp;&nbsp;
			<span style="font-size:12px;font-weight: normal;">
				<a href="?locale=zh_CN"><fmt:message key="page.home.languate.zh"/></a>|
				<a href="?locale=en_US"><fmt:message key="page.home.languate.en"/></a>
			</span>			
		</div>
		<form id="loginForm" action="" method="post" onsubmit="return validate();">
			<fieldset id="body">
				<fieldset>
                   	<label for="username"><fmt:message key="page.login.userName"/>：</label>
                   	<input type="text" name="username" id="username" value="sponge"/>
				</fieldset>
                <fieldset>
                	<label for="password"><fmt:message key="page.login.password"/>：</label>
                   	<input type="password" name="password" id="password" value="888888"/>
                </fieldset>
                <input type="submit" id="login" value="<fmt:message key="page.login.submit"/>" />
                <label for="rememberMe"><input type="checkbox" id="rememberMe" name="rememberMe"/><fmt:message key="page.login.remeberMe"/></label>
            </fieldset>
            <span><a href="#"><fmt:message key="page.login.forgotpassword"/></a></span>
    	</form>
    	<c:if test="${not empty shiroLoginFailure}">
			<font color="red"><fmt:message key="${shiroLoginFailure}"/></font>
		</c:if>
	</div>	
</body>
</html>
